package com.hxzy.boot.controller;

import com.hxzy.boot.pojo.Result;
import com.hxzy.boot.service.UserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author wzm
 * @create 2023-09-25 11:51
 * project_name:javaweb2308
 */
@RestController
public class UserController02 {

    //注入service实现类
//指定使用IOC容器中的名字叫xxx的bean对象来进行注入
    @Resource(name = "userServiceImpl01")
    private UserService userService;


    @RequestMapping("/user/list002")
    public Result getAll(){
        return Result.success(userService.findAll());
    }

}


